function estima_batch_subf(root,spec,subf,localfield,flag_initialcheck,flag_parallel)

disp('_________________________________'); 
disp('Beging Check:') 
dispaj('Root=',root); 
dispaj('Specification=',spec); 
dispaj('Subfolder    =',subf); 
pause(0.5); 

cucd=localfield.cucd; 
flag_rununix=localfield.flag_rununix;
onscreen=localfield.onscreen; 
add2outpath=localfield.add2outpath;
flag_makelocalcopy=localfield.flag_makelocalcopy; 
set_fname=localfield.set_fname; 
if isunix==1; onscreen=0; end 
disp('Warning off'); 
pause(1); 
lmj_shell;   
if flag_initialcheck==1 
    disp('END initial check') 
    return
end 
disp('Begin estimation'); 
estima_initial;

if flag_parallel==0
    estima_loop_main;
else
    estima_parallel;
end
cd(outpath); 
save workspace;
cd(cucd); 
if flag_structural==1
    if ~isunix
        estima_out;
    end
else
    estima_out_reduced;
end
cd(cucd); 